old_school
Extrude SOP does this for you. Not to be confused with Poly Extrude.
The options are in the Fuse Points parameter. It defaults to "Clamp Minimal Set" where each point as it self-intersects will stop-stick.
There are other options as well for you to try out but I believe the default "Clamp Minimal Set" is what you want.
The Extrude SOP was originally designed to extrude fonts but it comes in real handy for offsetting curves like this.
Great advice and example! Thanks a lot! I would just add for dummies like me, that you could filter black polys by normal direction for example)